﻿using Panuon.WPF.UI;
using System.Windows;

namespace WpfApp1.Views
{
    /// <summary>
    /// Interaction logic for Main.xaml
    /// </summary>
    public partial class Main : WindowX
    {
        private int _themeFlag = 0;
        public Main()
        {
            InitializeComponent();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Close();
        }

        private void BtnSwitchTheme_Click(object sender, RoutedEventArgs e)
        {
            //关于如何配置主题和资源字典，请查看App.xaml中的pu:GlobalSettings
            if (_themeFlag == 0)
            {
                GlobalSettings.ChangeTheme("Dark");
                _themeFlag = 1;
            }
            else
            {
                GlobalSettings.ChangeTheme("Light");
                _themeFlag = 0;
            }
        }
    }
}